#include <QtGui/QApplication>
#include <QTextCodec>
#include <QTranslator>

#include "mainWindow.h"
using namespace RightManagementStudio;


int main(int argc, char *argv[])
{
	QApplication a(argc, argv);

	QTextCodec::setCodecForLocale(QTextCodec::codecForName("system"));
	QTextCodec::setCodecForTr(QTextCodec::codecForName("system"));
	QTextCodec::setCodecForCStrings(QTextCodec::codecForName("system"));

	QTranslator translator; 
	translator.load("rightsmanagementstudio_zh.qm",".");
	qApp->installTranslator(&translator);

	MainWindow mainWindow;
	mainWindow.show();
	return a.exec();
}
